package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.PcrResultDetail;
import com.zhijian.medical.entity.vo.request.PcrResultDetailSearchVo;
import com.zhijian.medical.entity.vo.response.PcrResultDetailVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PcrResultDetailMapper {
    int deleteByPrimaryKey(Long id);

    /**
     * 根据实验id与设备id进行删除
     *
     * @param pcrId
     * @param deviceId
     * @return
     */
    int deleteByPcrIdAndDeviceId(@Param("pcrId") Long pcrId, @Param("deviceId") Long deviceId);

    /**
     * 根据实验id进行删除
     *
     * @param pcrId
     * @return
     */
    int deleteByPcrId(Long pcrId);

    /**
     * 根据扩增仪数据id删除
     *
     * @param pcrKzyId
     * @return
     */
    int deleteByPcrKzyId(Long pcrKzyId);

    int insert(PcrResultDetail record);

    int insertSelective(PcrResultDetail record);

    PcrResultDetail selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PcrResultDetail record);

    int updateByPrimaryKey(PcrResultDetail record);

    int count(PcrResultDetailSearchVo pcrResultDetailSearchVo);

    List<PcrResultDetailVo> selectList(PcrResultDetailSearchVo pcrResultDetailSearchVo);

    PcrResultDetailVo selectVoById(Long id);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities List<PcrResultDetail> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<PcrResultDetail> entities);

    /**
     * 根据病理id，查询这个样本的所有扩增曲线
     *
     * @param blh
     * @return
     */
    List<String> selectKzLineFilePathListByBlh(String blh);

}